package com.zpz.framework.zpzoauth.service;

import com.github.pagehelper.PageInfo;
import com.zpz.framework.zpzoauth.common.result.ZpzOauthResultMsg;
import com.zpz.framework.zpzoauth.pojo.pe.FrameReleaseAccessVo;
import com.zpz.framework.zpzoauth.pojo.qo.*;
import com.zpz.framework.zpzoauth.pojo.vo.GetAccessByRoleVo;
import com.zpz.framework.zpzoauth.pojo.vo.GetAccessVo;
import com.zpz.framework.zpzoauth.pojo.vo.OauthClientDetailsVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
 * @author zhangpanzhi
 * @time 2019-07-09
 * @description 未经本人允许请勿随便改动，尊重劳动
 * */
public interface ZpzOauthFrameAccessService {
    /**
     * 根据角色码查询权限
     * */
    ZpzOauthResultMsg<List<GetAccessByRoleVo>> getAccessByRole(String roleCodes);
    /**
     * 根据部门查询权限
     * */
    ZpzOauthResultMsg<List<GetAccessByRoleVo>> getAccessByDepartment(String roleCodes);
    /**
     * 获取释放权限
     * */
    ZpzOauthResultMsg<List<FrameReleaseAccessVo>> getReleaseAccess(String clientId);
    /**
     * 获取释放权限
     * */
    ZpzOauthResultMsg<OauthClientDetailsVo> getClient(String clientId);
    /**
     * 获取权限列表(分页)
     * */
    ZpzOauthResultMsg<PageInfo<GetAccessVo>> getAccessPageList(HttpServletRequest request, GetAccessQo getAccessQo);

    /**
     * 获取放行权限列表(分页)
     * */
    ZpzOauthResultMsg<PageInfo<GetAccessVo>> getReleaseAccessPageList(HttpServletRequest request, GetReleaseAccessListQo getReleaseAccessListQo);

    /**
     * 获取权限详情
     * */
    ZpzOauthResultMsg<GetAccessVo> getAccessDetail(HttpServletRequest request, GetAccessDetailQo getAccessDetailQo);
    /**
     * 获取放行权限详情
     * */
    ZpzOauthResultMsg<GetAccessVo> getReleaseAccessDetail(HttpServletRequest request, GetAccessDetailQo getAccessDetailQo);
    /**
     * 添加权限信息
     * */
    ZpzOauthResultMsg<Boolean> addAccess(HttpServletRequest request, InsertAccessQo insertAccessQo);
    /**
     * 添加放行权限信息
     * */
    ZpzOauthResultMsg<Boolean> addReleaseAccess(HttpServletRequest request, InsertReleaseAccessQo insertReleaseAccessQo);

    /**
     * 修改权限信息
     * */
    ZpzOauthResultMsg<Boolean> updateAccess(HttpServletRequest request, UpdateAccessQo updateAccessQo);

    /**
     * 修改放行权限信息
     * */
    ZpzOauthResultMsg<Boolean> updateReleaseAccess(HttpServletRequest request, UpdateReleaseAccessQo updateReleaseAccessQo);

    /**
     * 删除权限信息
     * */
    ZpzOauthResultMsg<Boolean> delAccess(HttpServletRequest request, DeleteAccessQo deleteAccessQo);

    /**
     * 删除放行权限信息
     * */
    ZpzOauthResultMsg<Boolean> delReleaseAccess(HttpServletRequest request, DeleteAccessQo deleteAccessQo);
}
